package com.yanqu.road.entity.activity.jieshi;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_u_activity_jieshi_data")
public class JieShiUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "用户ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "街市规模")
    private int jieShiLevel;

    @FieldTypeAnnotation(desc = "当前时辰")
    private int hour;

    @FieldTypeAnnotation(desc = "人偶id")
    private int dollId;

    @FieldTypeAnnotation(desc = "持有的人偶信息")
    private List<JieShiDollData> dollList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "持有的buff列表")
    private List<JieShiBuffData> buffList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "当前体力值")
    private int energy;

    @FieldTypeAnnotation(desc = "上次恢复体力时间")
    private long lastEnergyRecTime;

    @FieldTypeAnnotation(desc = "地图id")
    private int mapId;

    @FieldTypeAnnotation(desc = "地图上的建筑列表")
    private List<JieShiMapBuildData> mapBuildList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "已解锁的地块（默认解锁+消耗解锁）")
    private List<Integer> unlockPosition = new ArrayList<>();

    @FieldTypeAnnotation(desc = "地图上的泼皮列表(特殊事件)")
    private List<JieShiRuffianData> ruffianList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "地图上的事件列表")
    private List<JieShiEventData> eventList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "总武力")
    private long attack;

    @FieldTypeAnnotation(desc = "交子")
    private long jiaoZi;

    @FieldTypeAnnotation(desc = "活动积分(累计获得的交子总数)")
    private long score;

    @FieldTypeAnnotation(desc = "街道司等级")
    private int jieDaoSiLevel;

    @FieldTypeAnnotation(desc = "已拥有的活动门客数据")
    private List<JieShiPatronsData> patronsDataList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "巡游次数")
    private int travelTimes;

    @FieldTypeAnnotation(desc = "是否完成新手引导")
    private boolean guide;

    @FieldTypeAnnotation(desc = "街市名称")
    private String nickName = "";

    @FieldTypeAnnotation(desc = "修改名称次数")
    private int changeNameTimes;

    public JieShiUserData() {

    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getJieShiLevel() {
        return jieShiLevel;
    }
    public void setJieShiLevel(int jieShiLevel) {
        if (this.jieShiLevel != jieShiLevel) {
            this.jieShiLevel = jieShiLevel;
            setOp(DataStatus.Update);
        }
    }

    public int getHour() {
        return hour;
    }
    public void setHour(int hour) {
        if (this.hour != hour) {
            this.hour = hour;
            setOp(DataStatus.Update);
        }
    }

    public int getDollId() {
        return dollId;
    }
    public void setDollId(int dollId) {
        if (this.dollId != dollId) {
            this.dollId = dollId;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiDollData> getDollList() {
        return dollList;
    }
    public void setDollList(List<JieShiDollData> dollList) {
        if (null == dollList){
            return;
        }
        if (this.dollList == null || !this.dollList.equals(dollList)) {
            this.dollList = dollList;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiBuffData> getBuffList() {
        return buffList;
    }
    public void setBuffList(List<JieShiBuffData> buffList) {
        if (null == buffList){
            return;
        }
        if (this.buffList == null || !this.buffList.equals(buffList)) {
            this.buffList = buffList;
            setOp(DataStatus.Update);
        }
    }

    public int getEnergy() {
        return energy;
    }
    public void setEnergy(int energy) {
        if (this.energy != energy) {
            this.energy = energy;
            setOp(DataStatus.Update);
        }
    }

    public long getLastEnergyRecTime() {
        return lastEnergyRecTime;
    }
    public void setLastEnergyRecTime(long lastEnergyRecTime) {
        if (this.lastEnergyRecTime != lastEnergyRecTime) {
            this.lastEnergyRecTime = lastEnergyRecTime;
            setOp(DataStatus.Update);
        }
    }

    public int getMapId() {
        return mapId;
    }
    public void setMapId(int mapId) {
        if (this.mapId != mapId) {
            this.mapId = mapId;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiMapBuildData> getMapBuildList() {
        return mapBuildList;
    }
    public void setMapBuildList(List<JieShiMapBuildData> mapBuildList) {
        if (null == mapBuildList){
            return;
        }
        if (this.mapBuildList == null || !this.mapBuildList.equals(mapBuildList)) {
            this.mapBuildList = mapBuildList;
            setOp(DataStatus.Update);
        }
    }

    public List<java.lang.Integer> getUnlockPosition() {
        return unlockPosition;
    }
    public void setUnlockPosition(List<java.lang.Integer> unlockPosition) {
        if (null == unlockPosition){
            return;
        }
        if (this.unlockPosition == null || !this.unlockPosition.equals(unlockPosition)) {
            this.unlockPosition = unlockPosition;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiRuffianData> getRuffianList() {
        return ruffianList;
    }

    public void setRuffianList(List<JieShiRuffianData> ruffianList) {
        if (null == ruffianList){
            return;
        }
        if (this.ruffianList == null || !this.ruffianList.equals(ruffianList)) {
            this.ruffianList = ruffianList;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiEventData> getEventList() {
        return eventList;
    }
    public void setEventList(List<JieShiEventData> eventList) {
        if (null == eventList){
            return;
        }
        if (this.eventList == null || !this.eventList.equals(eventList)) {
            this.eventList = eventList;
            setOp(DataStatus.Update);
        }
    }

    public long getAttack() {
        return attack;
    }
    public void setAttack(long attack) {
        if (this.attack != attack) {
            this.attack = attack;
            setOp(DataStatus.Update);
        }
    }

    public long getJiaoZi() {
        return jiaoZi;
    }
    public void setJiaoZi(long jiaoZi) {
        if (this.jiaoZi != jiaoZi) {
            this.jiaoZi = jiaoZi;
            setOp(DataStatus.Update);
        }
    }

    public long getScore() {
        return score;
    }
    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public int getJieDaoSiLevel() {
        return jieDaoSiLevel;
    }
    public void setJieDaoSiLevel(int jieDaoSiLevel) {
        if (this.jieDaoSiLevel != jieDaoSiLevel) {
            this.jieDaoSiLevel = jieDaoSiLevel;
            setOp(DataStatus.Update);
        }
    }

    public List<JieShiPatronsData> getPatronsDataList() {
        return patronsDataList;
    }

    public void setPatronsDataList(List<JieShiPatronsData> patronsDataList) {
        if (null == patronsDataList){
            return;
        }
        if (this.patronsDataList == null || !this.patronsDataList.equals(patronsDataList)) {
            this.patronsDataList = patronsDataList;
            setOp(DataStatus.Update);
        }
    }

    public int getTravelTimes() {
        return travelTimes;
    }

    public void setTravelTimes(int travelTimes) {
        if (this.travelTimes != travelTimes) {
            this.travelTimes = travelTimes;
            setOp(DataStatus.Update);
        }
    }

    public boolean isGuide() {
        return guide;
    }

    public void setGuide(boolean guide) {
        if (this.guide != guide) {
            this.guide = guide;
            setOp(DataStatus.Update);
        }
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        if (nickName != null && !this.nickName.equals(nickName)) {
            this.nickName = nickName;
            setOp(DataStatus.Update);
        }
    }

    public int getChangeNameTimes() {
        return changeNameTimes;
    }

    public void setChangeNameTimes(int changeNameTimes) {
        if (this.changeNameTimes != changeNameTimes) {
            this.changeNameTimes = changeNameTimes;
            setOp(DataStatus.Update);
        }
    }
}
